feat(plugin): show compact live council badges in PreToolUse statusMessage#1415
Merged
Conversation
…ssage (#1367) Add council_badge.py formatter that reads HUD state and builds compact badge strings like [◮ secu] [🧪 auth] [⚠1] during active council sessions. Integrated into pre-tool-use.py so badges appear in the spinner statusMessage alongside existing agent status and TDD indicators.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
JeremyDev87
commented
Apr 6, 2026
JeremyDev87
left a comment
Owner
Author
There was a problem hiding this comment.
Review: APPROVE
CI Status: PASS (29/29, including e2e-plugin-docker and e2e-plugin-hooks)
Spec Compliance (#1367)
All 3 acceptance criteria met:
- ✅ PreToolUse emits compact council badges during active workflow requests via statusMessage
- ✅ Badges reflect current actor (eye + short name), focus (stage icon + label), and blocker status
- ✅ Single-line bracket format fits spinner/statusMessage constraints:
[◮ secu] [🧪 auth] [⚠1]
Code Quality
- Clean pure/impure separation:
shorten_agent_nameandformat_council_badgeare pure;build_council_badgereads state - Reuses
agent_status._load_agent_visualfor eye char lookup — no duplication - Focus label truncated at 12 chars; stage-to-icon mapping with default fallback
- Council badge only appears when
councilActive=true— no noise on unrelated tool calls - Silent exception handling follows existing hook resilience patterns
Test Coverage: 23 new tests
Unit (21):
shorten_agent_name: 7 tests — suffix removal, multi-word, single word, emptyformat_council_badge: 8 tests — all fields, no focus, blockers, truncation, stage icons, single-linebuild_council_badge: 6 tests — inactive, no agent, missing file, active with eye, no focus, fallback eye
Integration (2):
- Badge present in statusMessage when council active (with eye, short name, focus)
- No badge when council inactive
Issues Found: 0
No Critical, High, Medium, or Low issues found.
Recommendation: APPROVE
JeremyDev87
commented
Apr 6, 2026
JeremyDev87
left a comment
Owner
Author
There was a problem hiding this comment.
✅ Review complete - review agent approved. Issues: 0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
council_badge.py— pure formatter that builds compact badge strings from HUD statepre-tool-use.pystatusMessage alongside existing agent status and TDD indicatorscouncilActive=truein HUD stateCloses #1367
Badge Format
Files Changed
hooks/lib/council_badge.pyhooks/pre-tool-use.pytests/test_council_badge.pytests/test_pre_tool_use.pyTest plan
council_badge.py(pure formatter + HUD state reader)pre-tool-use.py(badge present/absent)